<?php
include_once 'library/confirm/BapFilterPost.class.php';

$item = new BapFilterPost();
// FETCHING
$tgl_bap	=	$_POST['tgl_bap'];
$no_do 		=	$_POST['no_do'];
$pemeriksa	=	$_POST['pemeriksa'];
$catatan	=	$_POST['catatan'];
?>
<div class="title">Konfirmasi - BAP</div>
<form name="frm_<?=$subbagian;?>" id="frm_<?=$subbagian;?>" method="post" action="index.php?bagian=<?=$bagian;?>&subbagian=<?=$subbagian;?>&action=confirmed">
    <ul>
		<li class="header"><span>Administrasi</span></li>
		<li><span>
            <label>Tanggal BAP:</label>
            <span class="confirm"><?=$tgl_bap;?></span>
			<input type="hidden" name="tgl_bap" value="<?=$tgl_bap;?>" />
        </span></li>
		<li><span>
            <label>Nomor DO:</label>
            <span class="confirm"><?=$no_do;?></span>
			<input type="hidden" name="no_do" value="<?=$no_do;?>" />
        </span></li>		
		<li><span>
            <label>Pemeriksa:</label>
            <span class="confirm"><?=$pemeriksa;?></span>
			<input type="hidden" name="pemeriksa" value="<?=$pemeriksa;?>" />
        </span></li>
		<li><span>
            <label>Catatan:</label>
            <span class="confirm"><?=$catatan;?></span>
			<input type="hidden" name="catatan" value="<?=$catatan;?>" />
        </span></li>
		
	</ul>
	<ul>
		<li class="header"><span>Item</span></li>
		<li class="desc">
			<span class="no_kotak">No Kotak</span>
			<span class="no_plastik">No Plastik</span>
			<span class="jml_kecambah_perkotak">Jml Kecambah perkotak</span>
			<span class="kondisi">Kondisi</span>
		</li>
		<?php
		$no = 0;	
		foreach($item->kotak['no_kotak'] as $i=>$v){
			$no++;
			$no_kotak   			= $v;
			$no_plastik				= $item->kotak['no_plastik'][$i];
			$jml_kecambah_perkotak	= $item->kotak['jml_kecambah_perkotak'][$i];
			$kondisi				= $item->kotak['kondisi'][$i];
		?>
		<li><span>
			<label><?=$no;?></label>
			<span class="confirm_nomor_kotak"><?=$no_kotak;?></span>
			<span class="confirm_nomor_plastik"><?=$no_plastik;?></span>
			<span class="confirm_jumlah_kecambah_perkotak"><?=$jml_kecambah_perkotak;?></span>
			<span class="confirm_kondisi"><?=$kondisi;?></span>
			<input type="hidden" id="no_kotak[]" name="no_kotak[]" value="<?=$no_kotak;?>"/>
			<input type="hidden" id="no_plastik[]" name="no_plastik[]" value="<?=$no_plastik;?>"/>
			<input type="hidden" id="jml_kecambah_perkotak[]" name="jml_kecambah_perkotak[]" value="<?=$jml_kecambah_perkotak;?>"/>
			<input type="hidden" id="kondisi[]" name="kondisi[]" value="<?=$kondisi;?>"/>
		</span>
		<?php 
		}
		?>
	</ul>
	<ul>
		<li class="header"><span>Simpan</span></li>
		<li class="button"><span>
			<input type="submit" name="submit" id="submit" value="Simpan Data" class="simpan"/>
			<a class="cancel" href="#" onclick="javascript:history.go(-1);">Batalkan</a>
		</span></li>
	</ul>
</form>
